package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.ClassShopBeen;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.FamilyBuyBeen;
import cn.xfdzx.android.apps.shop.bean.FoundGoodTitleBeen;
import cn.xfdzx.android.apps.shop.bean.HomeRetailBeen;
import cn.xfdzx.android.apps.shop.bean.NearShopBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface HomeRetailContract {
    interface Model {
        Flowable<HomeRetailBeen> initData();

        Flowable<FamilyBuyBeen> familyBuy(String sales_model);


        Flowable<FoundGoodTitleBeen> initTitle(String pid, String index_status);

        Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onInitDataSuccess(HomeRetailBeen bean);

        void onInitTitleSuccess(FoundGoodTitleBeen bean);

        void onFamilyBuySuccess(FamilyBuyBeen bean);

        void onAddCarSuccess(ConfirmGoodBeen bean, int position, int total_num);

        /**
         * 刷新完成
         */
        void finishRefresh();

        /**
         * 加载完成
         */
        void finishLoadMore();
    }

    interface Presenter {
        /**
         * 首页 市场采购
         * 初始化数据
         */
        void initTitle(String pid, String index_status);

        void initData();

        void familyBuy(String sales_model);

        void addCar(String is_new, String uniqueId, String productId, String cartNum, int position, int total_num);
    }
}
